using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERPBackend.Models
{
    public class Role : BaseModel
    {
        [Required]
        [MaxLength(50)]
        public string RoleName { get; set; }

        [MaxLength(200)]
        public string Description { get; set; }

        [Required]
        public bool Status { get; set; } = true;

        // 继承自BaseModel的字段: Id, CreatedBy, CreatedTime, UpdatedBy, UpdatedTime, IsDeleted

        // 导航属性
        public virtual ICollection<UserRole> UserRoles { get; set; }
        public virtual ICollection<RolePermission> RolePermissions { get; set; }
    }
}